<template>
      <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
                <el-form-item label="编码" prop="code">
                    <el-input v-model="form.code" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="名称" prop="name">
                    <el-input v-model="form.name" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="产品规格">
                    <el-input v-model="form.specification" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="备注">
                    <el-input v-model="form.remark" :rows="3" type="textarea" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="产品图片">
                     <!--  图片选择框  -->
                    <pictureUpload v-model="form.picture" />
                </el-form-item>
        </el-form>
</template>
<script>
import { form } from '@crud_my/crud'
const components = {}
import pictureUpload from '@/components/upload/pictureUpload'
components['pictureUpload'] = pictureUpload

export default {
  components: components,
  mixins: [form()],
  data() {
    return {
      form: this.crud.form,
      rules: {
        code: [
          { required: true, message: '编码不能为空', trigger: 'blur' }
        ],
        name: [
          { required: true, message: '名称不能为空', trigger: 'blur' }
        ]
      }
    }
  }
}
</script>
